$(function () {

    $("a").on("click", function () {
        var methods = $(this).data("method");
        if(methods){
            itsource[methods]();
        }
    });

    var ff = $("#ff");
    var recentHoust = $("#recentHoust");
    var itsource= {
        "search":function () {
            /* console.debug("search");*/
            //如果点击的是搜索提交from表单
            $('#ff').form("submit",{
                url:"kmain/search",
                onSubmit: function(){
                    return true
                },
                success:function(data){
                    var data = $.parseJSON(data);
                    recentHoust.datagrid("loadData",data);
                }
            });
        }
    }
})